
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/Public/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/Public/style/admin.css" media="all">
  <link id="layuicss-layer" rel="stylesheet"
    href="https://www.layui.com/admin/std/dist/layuiadmin/layui/css/modules/layer/default/layer.css?v=3.1.1"
    media="all">
</head>

<body>

  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-header">用户列表</div>
          <div class="layui-card-body">
            <table class="layui-hide" id="role-table-toolbar" lay-filter="role-table-toolbar"></table>
          </div>
        </div>
      </div>
    </div>
  </div>


  <script src="/Public/layui/layui.js"></script>
  <script>
    layui.config({
      base: '/Public/' //静态资源所在路径
    }).extend({
      index: 'lib/index' //主入口模块
    }).use(['index', 'table', 'form'], function () {
      var $ = layui.$
        , admin = layui.admin
        , table = layui.table
        , form = layui.form
        , util = layui.util;
      table.render({
        elem: '#role-table-toolbar'
        , url: '{:U('Rbac/userListApi')}'
        , toolbar: '#role-table-toolbar-add'
        , title: ''
        , cols: [[
          { type: 'checkbox', fixed: 'left' }
          , { field: 'id', title: '序号', sort: true }
          , { field: 'username',  title: '用户名称' }
          , { field: 'logintime', title: '上次登录时间', sort: true, templet: function (d) { return util.toDateString(d.end_times * 1000, "yyyy-MM-dd HH:mm:ss"); } }
          , { field: 'loginip',  title: '上次登录IP' }
          , { field: 'name',  title: '所属用户组' ,templet: function (d) { return d.role[0].name; } }
        ]]
        , page: true
    });


  });
  </script>
</body>

</html>